package com.lin.cms.domain;

import java.io.Serializable;

public class VoteItem implements Serializable {

	private static final long serialVersionUID = 1L;

	private int voteitemId;

	private int votetopicId;

	private String title;

	private int voteCount;

	private int priority;

	public VoteItem() {
	}

	public int getVoteitemId() {
		return voteitemId;
	}

	public void setVoteitemId(int voteitemId) {
		this.voteitemId = voteitemId;
	}

	public int getVotetopicId() {
		return votetopicId;
	}

	public void setVotetopicId(int votetopicId) {
		this.votetopicId = votetopicId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public int getVoteCount() {
		return voteCount;
	}

	public void setVoteCount(int voteCount) {
		this.voteCount = voteCount;
	}

	public int getPriority() {
		return priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + voteitemId;

		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final VoteItem other = (VoteItem) obj;
		if (voteitemId != other.voteitemId)
			return false;

		return true;
	}
	
	@Override
	public String toString() {
		return getClass().getName() + "@" + Integer.toHexString(hashCode()) + 
			"(" + 
			"voteitemId=" + "'" + voteitemId + "'" + 
			")";
	}
	
}
